package com.wp.aop01.service.controller;

import com.wp.aop01.service.annotation.MyPremission;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: WangPeng
 * @createTime: 2022/11/12 14:30
 * @description:
 * @version: v1.0
 */
@RestController
@RequestMapping("/hehe")
public class HeheController {

    @RequestMapping("/list")
    @MyPremission("RequestMappinglist")
    public String list(){
        System.out.println("查询用户");
        return "chaxunyonghu";
    }

    @RequestMapping("/save")
    @MyPremission("save")
    public String save(){
        System.out.println("添加用户");
        return "添加用户";
    }
}
